package com.ourteam.system.dao;

/**
 * Template Name : DAO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Aug 18 15:51:23 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:23
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.lang.StringUtils;


public class SysUserPhoto implements java.io.Serializable {
    private long id;

    /**
     * Attribute id Be Seted Falg
     */
    private boolean idSetted = false;

    /**
    * Attribute id is Null Falg
    */
    private boolean idNull = false;
    private long userId;

    /**
     * Attribute userId Be Seted Falg
     */
    private boolean userIdSetted = false;

    /**
    * Attribute userId is Null Falg
    */
    private boolean userIdNull = false;
    private String userPhoto;

    /**
     * Attribute userPhoto Be Seted Falg
     */
    private boolean userPhotoSetted = false;

    /**
    * Attribute userPhoto is Null Falg
    */
    private boolean userPhotoNull = false;

    public SysUserPhoto() {
        super();
    }

    /**
         * Get id
         *
         * @return long
         */
    final public long getId() {
        return id;
    }

    /**
     * Set id
     *
     * @param long
     */
    final public void setId(long id) {
        this.id = id;

        this.idSetted = true;

        this.setIdNull(false);
    }

    /**
     * Get id Has Been Setted
     *
     * @return boolean
     */
    final public boolean isIdSetted() {
        return this.idSetted;
    }

    /**
     * Set id Null
     *
     */
    final public void setIdNull() {
        this.idNull = true;
    }

    final public void setIdNull(boolean aNullFlag) {
        this.idNull = aNullFlag;
    }

    final public boolean isIdNull() {
        return this.idNull;
    }

    /**
         * Get userId
         *
         * @return long
         */
    final public long getUserId() {
        return userId;
    }

    /**
     * Set userId
     *
     * @param long
     */
    final public void setUserId(long userId) {
        this.userId = userId;

        this.userIdSetted = true;

        this.setUserIdNull(false);
    }

    /**
     * Get userId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isUserIdSetted() {
        return this.userIdSetted;
    }

    /**
     * Set userId Null
     *
     */
    final public void setUserIdNull() {
        this.userIdNull = true;
    }

    final public void setUserIdNull(boolean aNullFlag) {
        this.userIdNull = aNullFlag;
    }

    final public boolean isUserIdNull() {
        return this.userIdNull;
    }

    /**
         * Get userPhoto
         *
         * @return String
         */
    final public String getUserPhoto() {
        if (isUserPhotoNull()) {
            return null;
        } else {
            return StringUtils.trim(userPhoto);
        }
    }

    /**
     * Set userPhoto
     *
     * @param String
     */
    final public void setUserPhoto(String userPhoto) {
        this.userPhoto = StringUtils.trim(userPhoto);

        this.userPhotoSetted = true;

        this.setUserPhotoNull(this.userPhoto == null);
    }

    /**
     * Get userPhoto Has Been Setted
     *
     * @return boolean
     */
    final public boolean isUserPhotoSetted() {
        return this.userPhotoSetted;
    }

    /**
     * Set userPhoto Null
     *
     */
    final public void setUserPhotoNull() {
        this.userPhotoNull = true;
    }

    final public void setUserPhotoNull(boolean aNullFlag) {
        this.userPhotoNull = aNullFlag;
    }

    final public boolean isUserPhotoNull() {
        return this.userPhotoNull;
    }

    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = (prime * result) + (int) (getId() ^ (getId() >>> 32));

        return result;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if ((obj instanceof SysUserPhoto) == false) {
            return false;
        }

        SysUserPhoto other = (SysUserPhoto) obj;

        if (getId() != other.getId()) {
            return false;
        }

        return true;
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("id=");
        buffer.append(this.id);

        buffer.append("userId=");
        buffer.append(this.userId);

        buffer.append("userPhoto=");
        buffer.append(this.userPhoto);

        buffer.append("]");

        return buffer.toString();
    }
}
